
public class TestObserver {

    public static void main(String[] args) {
        Zone zone = new Zone();
        Friends friends = new Friends();
        friends.setName("张三丰");

        Trends trends = new Trends();
        trends.setNickName("张无忌");
        trends.setContent("666");
        zone.addObserver(friends);
        zone.publishTrends(trends);

    }
}